<%@ page language="java" import="java.util.*,com.bean.*,com.dao.*" pageEncoding="utf-8"%>
<%
	request.setCharacterEncoding("UTF-8");
	String username = request.getParameter("username");
	String password = request.getParameter("password");
	UserDao dao = new UserDao();
	UserBean bean = null;
	bean = dao.login(username, password);
	if(bean == null){
		response.sendRedirect("login.html");
	}else{
		session.setAttribute("user", bean);
		response.sendRedirect("index.html");
	}
%>

